home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / devel / tcl / tclx7_31.z / tclx7_31 / tcldev / tclX7.3a-p1 / tests / sync.test < prev    next >
Encoding:
Text File  |  1994-01-23  |  1.1 KB  |  40 lines

  1. #
  2. # sync.test
  3. #
  4. # Tests for the sync command.
  5. #---------------------------------------------------------------------------
  6. # Copyright 1993 Karl Lehenbauer and Mark Diekhans.
  7. #
  8. # Permission to use, copy, modify, and distribute this software and its
  9. # documentation for any purpose and without fee is hereby granted, provided
  10. # that the above copyright notice appear in all copies.  Karl Lehenbauer and
  11. # Mark Diekhans make no representations about the suitability of this
  12. # software for any purpose.  It is provided "as is" without express or
  13. # implied warranty.
  14. #------------------------------------------------------------------------------
  15. # $Id: 
  16. #------------------------------------------------------------------------------
  17. #
  18.  
  19. if {[info procs test] != "test"} then {source testlib.tcl}
  20.  
  21. unlink -nocomplain SYNC.TMP
  22.  
  23. Test sync-1.1 {sync tests} {
  24.     sync
  25. } 0 {}
  26.  
  27. Test sync-1.2 {sync tests} {
  28.     sync a b
  29. } 1 {wrong # args: sync ?filehandle?}
  30.  
  31.  
  32. Test sync-1.3 {sync tests} {
  33.     set fh [open SYNC.TMP w]
  34.     puts $fh [replicate XXX 1000]
  35.     sync $fh
  36.     close $fh
  37. } 0 {}
  38.  
  39. unlink -nocomplain SYNC.TMP
  40.